<include file="__THEME__/_header" />
<php>if(empty($_SESSION['mid'])){</php>
	<include file="__THEME__/reg_login" />
<php>}</php>
<!--header-->
<style type="text/css">
  #menu_box{
    width:70px;
    height:auto;
    border-left: 1px solid #ececec;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    position:absolute;
    z-index: 999;
    display:none;
    background-color: #fff;
  }
  #menu_box a{
    text-align: center;
    float: left;
    height:50px;
    line-height: 50px;
    width:100%;
  }
  #menu_box a:hover{
    color:#2388c0;
    background-color: #f9f9f9;
  }
</style>
<div class="header-worap">
  <div class="header">
    <div class="header-l fl"> <a href="/"><img src="<php>echo $_SESSION['web_logo'];</php>" ></a>
        <ul>
      		<volist name="site_top_nav" id="vo">
	            <if condition="$vo.app_name eq more">
	              <li onmouseover="mouseup(this);" onmouseout="mouseout(this);">
	                <a href="{$vo['url']}" >{$vo['navi_name']}</a>
	                <div id="menu_box">
	                  <volist name="vo['child']" id="val">
	                    <a <php>if(APP_NAME == $val['app_name'] || MODULE_NAME == $val['app_name']){echo "class='current'";}</php> target="{$val['target']}" href="{$val['url']}" >{$val['navi_name']}</a>
	                  </volist>
	                </div>
	              </li>
	            <else/>
	      			  <li><a <php>if(APP_NAME == $vo['app_name'] || MODULE_NAME == $vo['app_name']){echo "class='current'";}</php> target="{$vo['target']}" href="{$vo['url']}" >{$vo['navi_name']}</a></li>
	            </if>
      		</volist> 
        	<php>if(!empty($_SESSION['mid'])){</php>
        		<li><a href="{:U('classroom/Home/video')}" <php>if(MODULE_NAME=="Home" || MODULE_NAME=="User"){echo "class='current'";}</php> >管理中心</a></li>
        	<php>}</php>
        </ul>
    </div>
    <div class="header-r fr  position-rt">
         <php>if(empty($_SESSION['mid'])){</php>
         	<div class="header-logn fr"><a href="javascript:;" onClick="reg_login()">登录</a> | <a href="javascript:;" onClick="reg_login()">注册</a></div>
      	 <php>}else{</php>
         <div class="login-after">
              <div class="img"><a href="{:U('classroom/UserShow/index',array('uid'=>$_SESSION['mid']))}" ><img src="{:getUserFace($_SESSION['mid'])}"></a></div>
		      <dl class="login-after-position">
		          <dt class="dt"><a href="{:U('classroom/UserShow/index',array('uid'=>$_SESSION['mid']))}"><img src="{:getUserFace($_SESSION['mid'])}">{:getUserName($_SESSION['mid'])}</a></dt>
		          <dd class="login-after-bdbt"><a href="{:U('classroom/Home/wenda')}">我的问答</a></dd>
		          <dd class="login-after-bdbt"><a href="{:U('classroom/Home/note')}">我的笔记</a></dd>
		          <dd class="login-after-bdbt"><a href="{:U('classroom/User/setInfo')}">我的设置</a></dd>
		          <dd class="login-after-bdbt"><a href="{:U('public/Message/index')}">我的消息</a></dd>
		          <dd class="login-after-bdbt"><a href="javascript:;" onClick="logout()">退出</a></dd>
		      </dl>
		  </div>
      <php>}</php>

     <!--消息提示-->
      <ul class="news-msg"
          <php>if(!empty($mid) &&(!empty($unreadnum) || !empty($systemnum) || !empty($commentnum))){</php>
          		style="display:block;"
          <php>}else{</php>
        		style="display:none;"
          <php>}</php> >
          <a class="shanchu-ico" href="javascript:;" onClick="closeMsg()">×</a>
          <php>if(!empty($unreadnum) && !empty($mid)){</php>
                <li>{$unreadnum}条新的私信，&nbsp;<a href="{:U('public/Message/index')}">查看消息</a></li>
          <php>}</php>
          <php>if(!empty($systemnum) && !empty($mid)){</php>
                <li>{$systemnum}条新的系统消息，&nbsp;<a href="{:U('public/Message/notify')}">查看消息</a></li>
          <php>}</php>
          <php>if(!empty($commentnum) && !empty($mid)){</php>
                <li>{$commentnum}条新的评论消息，&nbsp;<a href="{:U('public/Message/comment')}">查看消息</a></li>
         <php>}</php>
      </ul>
      <script>
	        function closeMsg(){
	             $(".news-msg").remove();
	        }
      </script>
      <form class="header-search border fr" action="{:U('classroom/Search/index')}" method="get" onClick="return checkSearch()">
	        <input type="hidden" name="app" value="classroom" >
	        <input type="hidden" name="mod" value="Search" >
	        <input type="hidden" name="act" value="index" >
	        <input class="input fl" type="text" id="searchkey" name="searchkey" placeholder="请输入搜索关键字" >
	        <input class="Submit fr"  type="submit" value="">
      </form>
    </div>
  </div>
</div>
<!--右边浮动-->
<php> $videolisturl =  $mid ? U('classroom/Video/merge') :  "javascript:reg_login();"; </php>
<div id="albumShop" class="shopfixed"> 
	<a href="<php>echo $videolisturl;</php>" class="shop">&nbsp; 
		<span id="albumNum" class="shop-msg">
			  <php>if(function_exists('getVideoMergeNum')){</php>
			  		{:getVideoMergeNum($mid,session_id())}
			  <php>} else {</php>
			  		0
			  <php>}</php>
	    </span>
	</a> 
	<a target="_blank" href="tencent://message/?uin={$site.site_qq}&Menu=yes"   class="qa">&nbsp;</a> 
	<a href="#" class="wx">&nbsp;<div class="erwm"><img  src="{:getAttachUrlByAttachId($site['site_qrcode'])}"><i></i></div></a> 
</div>
<script>
function mouseup(cate){
  var left=$(cate).offset().left;
  $("#menu_box").css("display","block");
  $("#menu_box").css("left",left);
}
function mouseout(cate){
  $("#menu_box").css("display","none");
}
</script>